package net.dodoman.suanfa;

public class _MaoPao {
	public static void main(String[] args) {
		int[] array = { 1, 8, 7, 15, 21, 48, 3, 106, 610, 300 };
		int temp;
		for (int i = 0; i < array.length - 1; i++){
			boolean flag=true;
			for (int j = 0; j < array.length - 1; j++) {
				if (array[j] > array[j + 1]) {
					temp = array[j];
					array[j] = array[j + 1];
					array[j + 1] = temp;
					flag=true;
				}
			}
			if(!flag)
				break;
		}
		for (int k = 0; k < array.length - 1; k++)
			System.out.print(array[k]+"\t");
	}
}